Did you mean optimally?
optimally
verb
°in an optimal manner.